﻿using System;
using System.Globalization;
using System.Resources;

namespace UIAStudio
{
    internal static class StringResource
    {
        static ResourceManager _resMan = new ResourceManager("UIAStudio.StringResource", typeof(StringResource).Assembly);
        internal static string Get(string name, params object[] args)
        {
            string msg = ResourceManager.GetString(name);
            if ((!string.IsNullOrEmpty(msg) && (args != null)) && (args.Length > 0))
            {
                msg = string.Format(CultureInfo.InstalledUICulture, msg, args);
            }
            return msg;
        }

        internal static ResourceManager ResourceManager
        {
            get
            {
                return _resMan;
            }
        }
    }
}
